jQuery.ajaxSetup({
	cache: false,
	dataType: 'json',
	success: function (payload) {
		if (payload.snippets) {
			for (var i in payload.snippets) {
				$('#' + i).html(payload.snippets[i]);
			}
		}
	}
});

$('a.ajax').live('click', function() {
	event.preventDefault();
	$.get(this.href);
});

$('form.ajax').live('submit', function() {
	event.preventDefault();
	$.post(this.action, $(this).serialize());
});